import request from '@/utils/request'

export default {
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
      method: 'post',
      data: searchObj //使用json
    })
  },

  //删除医院设置
  deleteHospSet(id) {
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'

    })
  },

  //批量删除医院设置
  batchRemoveHospSet(idList){
    return request({
      url: `/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data: idList
    })
  },
    //锁定医院设置
    lockHospSet(id,status){
      return request({
        url: `/admin/hosp/hospitalSet/lock/${id}/${status}`,
        method: 'put',
      })
    },
    //添加医院设置
    saveHospSet(hospitalSet){
      return request({
        url: `/admin/hosp/hospitalSet/saveHospitalSet`,
        method: 'post',
        data: hospitalSet
      })
    },
    //根据ID查询医院
    getHospSet(id){
      return request({
        url: `/admin/hosp/hospitalSet/${id}`,
        method: 'get',
      })
    },
    //修改医院设置
    updateHospSet(hospitalSet){
      return request({
        url: `/admin/hosp/hospitalSet/updateHospitalSet`,
        method: 'put',
        data: hospitalSet
      })
    }
}
